"DESCRIPTION 1"="Windows XP is able to automatically dial a configured RAS (aka DUN) connection on startup."
"DESCRIPTION 2"="This is useful for computers that do not have a normal LAN connection, and only use a dial-in connection for communication."
"DESCRIPTION 3"="It might also be usefull for people that have a flat rate and want to be online as soon as they start the PC."
"DESCRIPTION 4"="A checkbox beside a connection means: Automatically dial this connection. No checkmark means: Do NOT automatically dial this connection."
"AUTHOR"="Xteq Systems"
"CONTACTURL"="http://www.xteq.com"
"COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
"COMMENT 1"="Based on the setting found by David Chernicoff, david@winnetmag.com"
sP="HKEY_CURRENT_USER\RemoteAccess\Profile"
sV="AutoConnect"
dim iItems 'contains the total amount of the registry keys
Dim aryItems() 'contains the name of the Registry paths (direct files starting with ".")
Dim aryItemsLoc() 'contains the registry location (\ShellNew or \ShellNew-)
Dim aryDesc() 'contains the description of the items
Sub Plugin_Initialize
if RegPathExists(sP) then
Call ReadRegistry
else
Call Disable
end if
End Sub
Sub ReadRegistry
for l=1 to iItems
Call SetUIElement(l,"")
next
iItems=RegEnumPaths(sP)
ReDim aryItems(iItems)
ReDim aryDesc(iItems)
l=1
e=1
sDebug=""
'read all data from the path
For l=1 to iItems
sItem=RegEnumElement(l)
aryItems(l)=sItem
aryDesc(l)=sItem
sDebug=sDebug & sItem
next
'Call DebugMsg(sDebug)
'AND NOW update the UI
for l=1 to iItems
Call SetUIElement(l,aryItems(l)) 'set data in X-Setup
if RegReadValue(sP & "\" & aryItems(l) & "\" & sV)=1 then
Call SetUIElementEx(l,true)
end if
Next
End Sub
Sub Plugin_Apply(ElementIndex,ElementSubIndex)
bChanged=false
iActivated=0
for l=1 to iItems
s=sP & "\" & aryItems(l) & "\" & sV
if GetUIElementEx(l)=true then
if RegReadValue(s)<>1 then
Call RegWriteValue(s,1,2)
bChanged=true
iActivated=iActivated+1
end if
else
if RegReadValue(s)<>0 then
Call RegWriteValue(s,0,2)
bChanged=true
end if
end if
next
if iActivated>1 then
Call MsgWarning("Notice: You have selected more than one entry for autoconnection. This is possible and can be made, but please note that this should not be done by default. The reason is, that Windows does not exactly know how to route the TCP/IP packages when there are two connection activated at the same time. You should use this configuration only when you are 100% sure what you are doing.")